import request from "@/utils/request";
//let baseUrl ='http://localhost:8080/'

// let baseUrl = 'http://10.168.1.213:8064'  //本地环境
// let baseUrl = 'http://10.168.1.123:8064'   //测试环境
// let baseUrl = 'http://10.168.1.222:8064'
let baseUrl = ''

// 列表
export function queryCommonStationUnitsInfo(data) {
  return request({
    url: baseUrl+"/freq/unitsInfo/queryCommonStationUnitsInfo",
    method: "post",
    data,
  });
}

// 新增/编辑
export function addConventionalUnit(data) {
  return request({
    url: baseUrl+"/freq/unitsInfo/insertOrUpdateCommonStationUnitsInfo",
    method: "post",
    data:data || {},
  });
}

// 编辑
export function updateCommonStationUnit(data) {
  return request({
    url: baseUrl+"/freq/unitsInfo/updateCommonStationUnitsInfo",
    method: "post",
    data:data || {},
  });
}

// 删除
export function deleteCommonStationUnit(data) {
  return request({
    url: baseUrl+"/freq/unitsInfo/deleteCommonStationUnitsInfo",
    method: "post",
    data:data || {},
  });
}

// 导出
export function downloadInfoSpecifiedInfo(data) {
  return request({
    url: baseUrl + "/freq/unitsInfo/downloadInfoSpecifiedInfo",
    method: "post",
    responseType: "blob",
    // headers: {
    //   'Authorization':
    //     "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXJ2aWNlVHlwZSI6NSwidXNlcl9uYW1lIjoiempidGdseSIsInJvbGVJZCI6IjE2NDU2NDc1NDYxMTc5MTg3MjIiLCJhdXRob3JpdGllcyI6WyJiODM3NWRhNC0zZGYzLTQ2NTQtOWY4NS01YzUwOTBjOTk1YmQiXSwib3JnSWQiOiIxNTgzMjk2MjgwOTkyNzQzNDI2IiwiY2xpZW50X2lkIjoidGVzdF9jbGllbnQiLCJhcHBSb2xlSWQiOm51bGwsInNjb3BlIjpbInJlYWQiXSwib3JnYW5pemF0aW9uIjoiempidGdseSIsIm5hbWUiOiJnbHkiLCJpZCI6IjE2NTA0MDk5NzAyMjQ5Nzk5NjkiLCJzdGF0ZSI6MSwiZXhwIjoxNjgzMTk3Njg3LCJqdGkiOiIyc2VzRGlsZE1KS3dKX1pJTXE2bEg5MkFDQnciLCJ1c2VybmFtZSI6InpqYnRnbHkifQ.dVdskYiluUoKHVutyhEPavWq-1a_tiTii4A3fjMK1dc",
    // },
    data,
  });
}


export function findById(data) {
  return request({
    url: baseUrl + `/freq/file/findById?fileId=`+data,
    method: "get"
  });
}


